home *** CD-ROM | disk | FTP | other *** search
- if(3 < eval("/Variables:InvNb"))
- {
- if(_root.Inventaire.ZoneMoveG.hitTest(_root._xmouse,_root._ymouse,true))
- {
- if(eval("/Variables:Acceleration") < 1 and eval("/Variables:Acceleration") >= 0)
- {
- set("/Variables:Acceleration",-1);
- }
- if((_root.Inventaire._xmouse - _root.Inventaire.BorneCentre._x + 20) / 2 < eval("/Variables:Acceleration"))
- {
- if(eval("/Variables:Acceleration") < 0)
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") + eval("/Variables:Acceleration") / 2);
- }
- else
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") - eval("/Variables:Acceleration") / 2);
- }
- }
- else if(eval("/Variables:Acceleration") < 0)
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") - eval("/Variables:Acceleration") / 2);
- }
- else
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") + eval("/Variables:Acceleration") / 2);
- }
- }
- else if(_root.Inventaire.ZoneMoveD.hitTest(_root._xmouse,_root._ymouse,true))
- {
- if(-1 < eval("/Variables:Acceleration") and 0 >= eval("/Variables:Acceleration"))
- {
- set("/Variables:Acceleration",1);
- }
- if((_root.Inventaire._xmouse - _root.Inventaire.BorneCentre._x - 20) / 2 < eval("/Variables:Acceleration"))
- {
- if(0 < eval("/Variables:Acceleration"))
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") - eval("/Variables:Acceleration") / 2);
- }
- else
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") + eval("/Variables:Acceleration") / 2);
- }
- }
- else if(0 < eval("/Variables:Acceleration"))
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") + eval("/Variables:Acceleration") / 2);
- }
- else
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") - eval("/Variables:Acceleration") / 2);
- }
- }
- else if(1 < eval("/Variables:Acceleration"))
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") - eval("/Variables:Acceleration") / 2);
- }
- else if(eval("/Variables:Acceleration") < -1)
- {
- set("/Variables:Acceleration",eval("/Variables:Acceleration") - eval("/Variables:Acceleration") / 2);
- }
- else
- {
- set("/Variables:Acceleration",0);
- }
- if(eval("/Variables:Acceleration") < -20)
- {
- set("/Variables:Acceleration",-20);
- }
- else if(20 < eval("/Variables:Acceleration"))
- {
- set("/Variables:Acceleration",20);
- }
- setProperty("../Chaine1", _X, getProperty("../Chaine1", _X) - eval("/Variables:Acceleration"));
- setProperty("../Chaine2", _X, getProperty("../Chaine2", _X) - eval("/Variables:Acceleration"));
- setProperty("../Chaine3", _X, getProperty("../Chaine3", _X) - eval("/Variables:Acceleration"));
- if(_root.Inventaire.ZoneMoveD.hitTest(_root._xmouse,_root._ymouse,true))
- {
- if(getProperty("../Chaine1", _X) + eval("/Variables:InvNb") * eval("/Variables:LargeurObjet") < getProperty("../BorneGauche", _X))
- {
- setProperty("../Chaine1", _X, getProperty("../Chaine3", _X) + eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"));
- }
- if(getProperty("../Chaine2", _X) + eval("/Variables:InvNb") * eval("/Variables:LargeurObjet") < getProperty("../BorneGauche", _X))
- {
- setProperty("../Chaine2", _X, getProperty("../Chaine1", _X) + eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"));
- }
- if(getProperty("../Chaine3", _X) + eval("/Variables:InvNb") * eval("/Variables:LargeurObjet") < getProperty("../BorneGauche", _X))
- {
- setProperty("../Chaine3", _X, getProperty("../Chaine2", _X) + eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"));
- }
- }
- else
- {
- if(getProperty("../BorneDroite", _X) < getProperty("../Chaine1", _X) - eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"))
- {
- setProperty("../Chaine1", _X, getProperty("../Chaine2", _X) - eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"));
- }
- if(getProperty("../BorneDroite", _X) < getProperty("../Chaine2", _X) - eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"))
- {
- setProperty("../Chaine2", _X, getProperty("../Chaine3", _X) - eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"));
- }
- if(getProperty("../BorneDroite", _X) < getProperty("../Chaine3", _X) - eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"))
- {
- setProperty("../Chaine3", _X, getProperty("../Chaine1", _X) - eval("/Variables:InvNb") * eval("/Variables:LargeurObjet"));
- }
- }
- }
-